package com.googlecode.connectlet.crypto.stream.provider;

import com.googlecode.connectlet.crypto.cipher.CipherFactory;
import com.googlecode.connectlet.crypto.stream.CfbDecipheror;
import com.googlecode.connectlet.crypto.stream.CfbEncipheror;

public final class CfbCipherSpi extends FeedbackCipherSpi {
	public CfbCipherSpi(CipherFactory cipherFactory) {
		super(cipherFactory);
	}

	@Override
	protected CfbEncipheror getEncCipher(CipherFactory factory,
			byte[] key, byte[] iv) {
		return new CfbEncipheror(factory.getEncipheror(key), iv);
	}

	@Override
	protected CfbDecipheror getDecCipher(CipherFactory factory,
			byte[] key, byte[] iv) {
		return new CfbDecipheror(factory.getEncipheror(key), iv);
	}
}